package com.lsq.tucao.express.service;

import com.lsq.tucao.express.bean.po.UserLike;
import com.lsq.tucao.express.response.JsonResult;

public interface UserLikeService {

    /**
     * @author lsq
     * @description 根据userId，分页查询用户点赞的吐槽或鸡汤
     * @param current 页码
     * @param size 每页条数
     * @param userId 用户id
     * @param sort 分类，0->搜索吐槽 ；1->搜索鸡汤
     * @return com.lsq.tucao.express.response.JsonResult
     * @create 2021/4/22 17:14
     */
    JsonResult getTucaoOrHeartLikeByUserId(Integer current,Integer size,Long userId,Integer sort);

    /**
     * @author lsq
     * @description 增加用户的鸡汤点赞或吐槽点赞内容，给吐槽或鸡汤的点赞数加一
     * @param userLike 点赞实体类
     * @return com.lsq.tucao.express.response.JsonResult
     * @create 2021/4/22 17:22
     */
    JsonResult likeTucaoOrHeart(UserLike userLike);

    /**
     * @author lsq
     * @description 取消对某条吐槽或鸡汤的点赞
     * @param userId 用户id
     * @param tucaoOrHeartId 吐槽id或鸡汤id
     * @param sort 分类；0->吐槽；1->鸡汤
     * @return com.lsq.tucao.express.response.JsonResult
     * @create 2021/4/22 19:49
     */
    JsonResult cancelLikeTucaoOrHeart(Long userId,Long tucaoOrHeartId,Integer sort);

    /**
     * @author lsq
     * @description 通过userId和tucaoId，判断该用户是否对这条吐槽进行过点赞操作
     * @param userId 用户id
     * @param tucaoOrHeartId 吐槽id
     * @param sort 分类；0->吐槽；1->鸡汤
     * @return com.lsq.tucao.express.response.JsonResult
     * @create 2021/4/22 18:25
     */
    JsonResult judgeIsLike(Long userId,Long tucaoOrHeartId,Integer sort);

}
